home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 18
/
CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso
/
CDsupport
/
IDer
/
Routines
/
BadDOS.s
< prev
next >
Wrap
Text File
|
1997-02-18
|
991b
|
27 lines
BadDOS: Lea DOSLibrary(PC),A1 ;name of the library to open
Moveq #0,D0 ;we need any version
CALL OpenLibrary,EXEC ;open the library
Move.L D0,A6 ;don't bother with a variable as we only need the library now
CALL Output ;get the defualt STOUT
Move.L D0,D1 ;move it into d1 for use by another function
Beq.S .NoDOS ;if there is no handle, then ARGH!
Move.L #ErrDOS,D2 ;text to type
Moveq #46,D3 ;number of character to output
CALL Write ;write the text to the standard out
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
.NoDOS Move.L A6,A1 ;move the library base into A1
CALL CloseLibrary,EXEC ;close it down to keep people happy
Tst.L _WBMessage ;were we launched from Workbench?
Beq.S .NoWB ;if not, then don't worry
CALL Forbid ;stop the system dead
Move.L _WBMessage(PC),A1 ;take the message from WB
CALL ReplyMsg ;and reply to it, saying we are finished
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
.NoWB Moveq #RETURN_ERROR,D0 ;fault error returned
Rts ;return to the shell/wb